import { createApp } from 'vue'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

import router from '@/router/index'
import { store } from '@/store/index'
import directive from '@/directive'
import App from '@/App.vue'
import '@/permission' // permission control

import 'normalize.css'
import '@/assets/styles/tailwindcss.css'
import './assets/styles/element-variables.scss'

import '@/assets/styles/index.scss' // global css
import '@/assets/styles/cj.scss' // cj css

import 'virtual:svg-icons-register' // 必须引入

const app = createApp(App)

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

console.log(router)
app.use(directive)

app.use(router).use(store).mount('#app')
